package com.xy.service.impl;

import com.xy.dao.UserRoleDao;
import com.xy.model.UserAndRole;
import com.xy.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserRoleServiceImpl implements UserRoleService{
    @Autowired
    UserRoleDao userRoleDao;
    public int addUserRole(UserAndRole userAndRole) {
        return userRoleDao.addUserRole(userAndRole);
    }

    public int delUserRole(Integer userId, Integer roleId) {
        return userRoleDao.delUserRole(userId,roleId);
    }
}
